package com.chicken.pojo;

import org.apache.commons.lang.StringUtils;

/*
 * Created By wangzewei on 18-1-5
 */
public class StringUtil {
    public static String SEPARATOR = String.valueOf('\u001d');

    public StringUtil() {
    }

    public static boolean isEmpty(String value) {
        if (value != null) {
            value = value.trim();
        }

        return StringUtils.isEmpty(value);
    }

    public static boolean isNotEmpty(String value) {
        return !isEmpty(value);
    }

    public static String[] spliteString(String value, String regex) {
        String[] result = null;
        if (isNotEmpty(value)) {
            result = value.split(regex);
        }

        return result;
    }
}
